home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 969 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.5 KB

  1. Path: grafix.xs4all.nl!john.hendrikx
  2. Date: Fri, 12 Jan 96 18:28:15 GMT+1
  3. Newsgroups: comp.sys.amiga.programmer
  4. Distribution: world
  5. Subject: Re: Amiga programmers in deep shit...
  6. MIME-Version: 1.0
  7. Content-Type: text/plain; charset=iso-8859-1
  8. Content-Transfer-Encoding: 8bit
  9. From: john.hendrikx@grafix.xs4all.nl (John Hendrikx)
  10. Message-ID: <john.hendrikx.4606@grafix.xs4all.nl>
  11. Organization: Grafix Attack BBS Holland
  12.  
  13. In a message of 10 Jan 96 Stephan Schaem wrote to All:
  14.  
  15.  >>  SoftSCSI_ATEA.device   2.8%
  16.  >>  DH1                    2.6%
  17.  >>  DoLotsOfSmallReads     1.5%
  18.  >>  DisplaySpy             1.2%  (the program displaying a CPU-time graph)
  19.  >>  input.device           1.1%
  20.  >>  TopCPU                 0.5%  (the program which displayed these values)
  21.  >>  BOOT:C/SMouse          0.3%  (my wb-titlebar clock program)
  22.  
  23.  >> Only the first 3 are the ones involved with reading the data from the HD
  24.  >> (the SCSI-device, the filesystem and the program performing the reads).
  25.  
  26.  >> The DoLotsOfSmallReads program consists of nothing more than this:
  27.  
  28.  >>   do {
  29.  >>     WaitTOF();
  30.  >>     Read(fh,&buffer,512);
  31.  >>   } while(result==512)
  32.  
  33.  SS>  Get the system time in tick before the read() and after:
  34.  
  35.  SS>  Because its possible that the ~14% happen once every 60 frame. 14% of
  36.  SS> 60*262 = 2200 scanline... 
  37.  
  38. Well, maybe it helps if I told you that my HD led was flashing at about 25 Hz
  39. (maybe more, hard to tell :-)))
  40.  
  41.  SS>  From your test result I see it take 14% of the system time not 14% of
  42.  SS> a  frame wich is very diferent for what you want to do.
  43.  
  44. Yes, but this isn't what was happening, the HD led definitely flashed really
  45. rapidly, it reminded me of running interlaced (so that's where I got that 25 Hz
  46. figure from).
  47.  
  48.  >> As you can see above it ain't really necessary, if you can spare a bit of
  49.  >> CPU time.  Even with 1K or 2K block reads every frame you still beat
  50.  >> floppies by a long way, and without any noticeable slow-downs.
  51.  
  52.  SS>  It will work if you are garantied 80% of the frame for 'rendering'.
  53.  
  54. It will also work if you do the disk reading at a lower pri, so it will take
  55. whatever time is left to do the reading. You will have to use a seperate task
  56. anyway to do good asynchronous reading IMO (or use packets, but I wouldn't
  57. recommend going that low-level).
  58.  
  59. Grtz John
  60.  
  61. -----------------------------------------------------------------------
  62.  John.Hendrikx@grafix.xs4all.nl   TextDemo/FastView/Etc... development
  63. -----------------------------------------------------------------------
  64. -- Via Xenolink 1.981, XenolinkUUCP 1.1
  65.